<?php

// src/Salgamos/BackendBundle/Entity/Image.php
namespace Salgamos\BackendBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="image")
 */
class Image
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     * @var type 
     */
    private $id;
    
    /**
     * @ORM\Column(type="boolean")
     * @var type 
     */
    private $isCover;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $name;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $extension;

    /**
     * @ORM\Column(type="string", length=255)
     * @var type 
     */
    private $tempName;
    
    /**
     * @ORM\Column(type="integer")
     * @var type 
     */
    private $size;
    
    /**
     * @ORM\ManyToOne(targetEntity="Location", inversedBy="image")
     * @ORM\JoinColumn(name="location_id", referencedColumnName="id")
     */
    private $location;
    

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Image
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set extension
     *
     * @param string $extension
     * @return Image
     */
    public function setExtension($extension)
    {
        $this->extension = $extension;
    
        return $this;
    }

    /**
     * Get extension
     *
     * @return string 
     */
    public function getExtension()
    {
        return $this->extension;
    }

    /**
     * Set tempName
     *
     * @param string $tempName
     * @return Image
     */
    public function setTempName($tempName)
    {
        $this->tempName = $tempName;
    
        return $this;
    }

    /**
     * Get tempName
     *
     * @return string 
     */
    public function getTempName()
    {
        return $this->tempName;
    }

    /**
     * Set size
     *
     * @param integer $size
     * @return Image
     */
    public function setSize($size)
    {
        $this->size = $size;
    
        return $this;
    }

    /**
     * Get size
     *
     * @return integer 
     */
    public function getSize()
    {
        return $this->size;
    }

    /**
     * Set location
     *
     * @param \Salgamos\BackendBundle\Entity\Location $location
     * @return Image
     */
    public function setLocation(\Salgamos\BackendBundle\Entity\Location $location = null)
    {
        $this->location = $location;
    
        return $this;
    }

    /**
     * Get location
     *
     * @return \Salgamos\BackendBundle\Entity\Location 
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Set isCover
     *
     * @param boolean $isCover
     * @return Image
     */
    public function setIsCover($isCover)
    {
        $this->isCover = $isCover;
    
        return $this;
    }

    /**
     * Get isCover
     *
     * @return boolean 
     */
    public function getIsCover()
    {
        return $this->isCover;
    }
}